package com.zhilianbao.leyaogo.app;

import com.bql.utils.DeviceUtils;
import com.bql.utils.ManifestUtils;
import com.bql.utils.NetworkUtils;
import com.github.moduth.blockcanary.BlockCanaryContext;
import com.zhilianbao.leyaogo.BuildConfig;

import java.util.List;

/**
 * ClassName: BlockCanaryContext <br>
 * Description: 性能监控配置<br>
 * Author: Cyarie <br>
 * Created: 2016/10/19 16:32 <br>
 * Update Time：<br>
 * Update Description：<br>
 */
public class GoBlockCanaryContext extends BlockCanaryContext {

    @Override
    public String provideQualifier() {
        return "LeYaoGo_v" + ManifestUtils.getVersionName(provideContext()) + "_" + ManifestUtils.getVersionCode(provideContext());
    }

    @Override
    public String provideNetworkType() {
        return NetworkUtils.getNetWorkType(provideContext());
    }

    @Override
    public String provideUid() {
        return DeviceUtils.getUDID(provideContext());
    }

    @Override
    public boolean displayNotification() {
        return BuildConfig.LOG_ENABLE;
    }

    @Override
    public int provideMonitorDuration() {
        return 9999;
    }

    @Override
    public int provideBlockThreshold() {
        return 800;
    }

    @Override
    public List<String> concernPackages() {
        List<String> list = super.provideWhiteList();
        list.add("com.zhilianbao");
        return list;
    }
}
